package com.michael.study.network;

import org.jetbrains.annotations.NotNull;

import java.io.IOException;

import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;

/**
 * Description:
 *
 * <p>Created by liuguoquan on 2020/8/5 19:40.
 */
public class CommonRequestInterceptor implements Interceptor {

    private INetWorkInfo mINetWorkInfo;

    public CommonRequestInterceptor(INetWorkInfo mINetWorkInfo) {
        this.mINetWorkInfo = mINetWorkInfo;
    }

    @NotNull
    @Override
    public Response intercept(@NotNull Chain chain) throws IOException {
        Request.Builder builder = chain.request().newBuilder();
        builder.addHeader("platform", "android");
        return chain.proceed(builder.build());
    }
}
